package com.example.demo.bulider.demo1;

public class Worker extends Builder{

    private Product product;

    public Worker(){
        product = new Product();
    }

    @Override
    void builderA() {
        product.setBuilderA("第一步");
        System.err.println("第一步");
    }

    @Override
    void builderB() {
product.setBuilderB("第二步");
        System.err.println("第二步");
    }

    @Override
    void builderC() {
        product.setBuilderC("第三步");
        System.err.println("第三步");
    }

    @Override
    void builderD() {
        product.setBuilderD("第四步");
        System.err.println("第四步");
    }

    @Override
    Product getProduct() {
        return product;
    }
}
